package com.project.erp.activiti.servicetask;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

/**
 * @author Joram Barrez
 */
public class DelegateExpressionBean implements JavaDelegate {
  
  private SentenceGenerator sentenceGenerator;
  
  public void execute(DelegateExecution execution) throws Exception {
    execution.setVariable("myVar", sentenceGenerator.getSentence());
  }
  
  public void setSentenceGenerator(SentenceGenerator sentenceGenerator) {
    this.sentenceGenerator = sentenceGenerator;
  }

}
